/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package FrameWork;

import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.Sprite;

/**
 *
 * @author ThanhTri
 */
public class MySprite extends Sprite {
    float m_CurTime, m_Time;
    public MySprite (Image _Image,int _x,int _y,float _Time){
        super (_Image,_x,_y);
        m_CurTime = 0;
        m_Time = _Time;
    }
    public void setTime (float _Time){
        m_Time = _Time;
    }
    public float getTime (){
        return m_Time;
    }
    public void UpdateAnima (float _Time){
        m_CurTime+= _Time;
        if (m_CurTime>= m_Time){
            m_CurTime =0;
            super.nextFrame();
        }
    }
}
